import request from '@/utils/request/req';

// 获取文件列表
export function getFileList(params: { pageNum: number; pageSize: number }) {
  return request({
    url: '/msg/aiFile/list',
    method: 'get',
    params
  });
}

// 上传文件
export function uploadFile(data: FormData) {
  return request({
    url: '/msg/aiFile/upload',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}

// 删除文件
export function deleteFile(id: number) {
  return request({
    url: `/msg/aiFile/delete/${id}`,
    method: 'post'
  });
}
